package com.haiya.builder.basic;

import com.haiya.builder.basic.builder.Builder;
import com.haiya.builder.basic.builder.ConcreteBuilder1;
import com.haiya.builder.basic.builder.ConcreteBuilder2;
import com.haiya.builder.basic.product.Product;

public class Client {
    public static void main(String[] args) {
        /**
         * 1. 实例化具体的构建者
         */
        Builder builder = new ConcreteBuilder2();
        /**
         * 2. 实例化指挥官实例
         */
        Director director = new Director(builder);
        /**
         * 3. 指挥官进行商品构建，并返回构建好的商品实例
         */
        Product product = director.construct();
        /**
         * 4. 调用商品实例，完成具体的业务
         */
        product.show();
    }
}
